<template>
  <div>
    <h1>生命周期</h1>
    <A v-if="flag"></A>
    <br>
    <button @click="flag = !flag">创建-销毁组件</button>
  </div>
</template>

<script setup lang="ts">
import A from "./components/A.vue"
import { ref } from "vue"

const flag = ref<Boolean>(true)


</script>

<style scoped></style>